package com.doujiao.core.exceptions.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RespEnum {
    SUCCESS(200, "操作成功"),
    FAIL(500, "操作失败"),
    INVALID_ACCOUNT(1001, "无效的账户"),
    USERNAME_EXISTS(1002, "用户名已存在"),
    UNAUTHORIZED(401, "未授权访问"),
    ERROR(-1, "失败"),
    INVALID_PARAMETERS(30001, "参数错误"),
    TOO_MANY_REQUESTS(30002, "请求过多"),
    TOKEN_ERROR(40001, "token错误"),
    TOKEN_EXPIRED(40002, "token过期"),
    TOKEN_SIGNATURE_INVALID(40003, "token签名无效"),
    TOKEN_MALFORMED(40004, "token格式错误"),
    TOKEN_MISSING(40005, "token丢失"),
    INVALID_PHONE(40007, "非法的手机号"),
    LOGIN_TYPE_NOT_SUPPORTED(40008, "不支持的登录类型"),
    PERMISSION_DENIED(40301, "权限不足"),
    ADMIN_NOT_EXIST(40302, "管理员不存在"),;;

    private final Integer code;
    private final String message;
}
